<h1>Listing teachers</h1>

<% odd_or_even=1
	for teacher in @teachers 
	odd_or_even=1-odd_or_even %>

	<div class="profile<%=odd_or_even%>">
		<div class="photo_frame"><img class="photo" src="" /></div>
		
		<div class="profile_content">
			
			<span class="profile_register"><%=h teacher.code %></span><br />	
			<span class="profile_register"><%=h teacher.name %></span><br />
			
		    <td><%= link_to 'Show', :action => 'show', :id => teacher %></td>
			<td><%= link_to 'Edit', :action => 'edit', :id => teacher %></td>
			<td><%= link_to 'Destroy', { :action => 'destroy', :id => teacher }, :confirm => 'Are you sure?', :post => true %></td>
		</div>
	</div>
<% end %>

<%= link_to 'Previous page', { :page => @teacher_pages.current.previous } if @teacher_pages.current.previous %>
<%= link_to 'Next page', { :page => @teacher_pages.current.next } if @teacher_pages.current.next %> 

<br />

<%= link_to 'New teacher', :action => 'new' %>
